﻿@{Lang lang = ViewBag.Lang;}
@model IEnumerable<TGVR_Boot.DTO.TicketDTO>

<div class="boder-table">
 <table cellpadding="0" cellspacing="0" style="width:100%;" border="1">
        <tbody>
            <tr>
                <td style="text-align: center">Hãng</td>
                <td style="text-align: center">Số hiệu</td>
                <td style="text-align: center">Thời gian</td>
                <td style="text-align: center">Giá vé</td>
            </tr>

            @foreach (var item in Model)
            {
                
                <tr onclick="selectVal(this);" >
                    <td>
                        <img src="@item.Image" /></td>
                    <td>@item.FlightNo</td>
                    <td style="text-align: center">@item.DateStart.ToString("HH:mm") - @item.DateEnd.ToString("HH:mm")</td>
                    <td style="text-align: right">@item.Price.ToString("#,##0")</td>
                </tr>
            }

        </tbody>
    </table>
</div>

@*@(Html.Telerik().Grid(Model)
        .Name("ListTicket")
        .Columns(columns =>
        {
            columns.Bound(o => o.FlightNo).Width(100).Title(lang.FIRM)
                .Template(o => "<input type='hidden' class='hotsale' value='"+(o.IsHotSale?"true":"false")+"'><img title='" + o.FlightNo + "' altr='" + o.FlightNo + "' src='/content/images/logo/" + o.FlightNo.Substring(0,2) + ".png'/>");
            columns.Bound(o => o.FlightNo).Width(100).Title(lang.FLIGHTNO)
                .Template(o => "<b>" + o.FlightNo + "</b>").HtmlAttributes(new { @class = "f-no" });
            columns.Bound(o => o.From).Width(100).Title(lang.FROM);
            columns.Bound(o => o.To).Width(100).Title(lang.TO);
            columns.Bound(o => o.DateStart).Width(250).Title(lang.DATE).Format("{0:dd/MM/yyyy}")
                .Template(o => "<div class='f-time'>" + o.DateStart.ToString("dd/MM/yyyy")  + "</div>");
            columns.Bound(o => o.DateStart).Width(250).Title(lang.TIME).Format("{0:HH:mm}")
                .Template(o => "<div class='f-time'>" + o.DateStart.ToString("HH:mm") + " - " + o.DateEnd.ToString("HH:mm") + "</div>");
        })
)*@